﻿using Microsoft.Web.WebView2.WinForms;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XiTi
{
    public class WebView2Helper
    {
        public static void SetWebView2ExecutableFolder(WebView2 webView, string folder)
        {
            // 使用本地webview2 方法1：
            if(Directory.Exists(folder))
            {
                webView.CreationProperties = new Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties
                {
                    BrowserExecutableFolder = folder
                };
            }
        }
    }
}
